[FIX] 47755: Including images with drag-and-drop without specifying image size leads to missing editor buttons#11608
Closed
chfsx wants to merge 1 commit into
Conversation
…mage size leads to missing editor buttons Drag-dropped images without explicit dimensions caused TinyMCE init to fail on edit (toolbar buttons missing). Forum has no image plugin loaded and drag-drop bypasses the policy of disallowing inline images via data URIs. Disable image-dimension auto-detection and prevent paste/drag embedding of data URIs. https://mantis.ilias.de/view.php?id=47755
Member
Author
|
Should be picked to trunk and release_10 as well |
5 tasks
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drag-dropped images without explicit dimensions caused TinyMCE init to fail on edit of forum posts (toolbar buttons missing).
The forum does not load the
imageplugin and has no ILIAS-mob integration in the editor toolbar — drag-drop bypasses this by embedding images asdata:URIs. On reload, TinyMCE's async image-dimension detection on dimensionless data-URI images breaks the toolbar render.Fix
In
tpl.tinymce_frm_post.js:image_dimensions: false— skip async dimension detection (fixes existing posts so they become editable again).image_caption: false— no figure-wrapping (consistent with no image plugin loaded).paste_data_images: falseandimages_dataimg_filter: () => false— prevent paste/drag-drop from embedding new data-URI images.Only
tpl.tinymce_frm_post.jsis touched — other TinyMCE usages (Wiki, Test, Cert, …) usetpl.tinymce.jsand are not affected.Mantis: https://mantis.ilias.de/view.php?id=47755
Test plan